import request from '@/utils/request'

// 查询打本记录列表
export function listRecord(query) {
  return request({
    url: '/record/record/list',
    method: 'get',
    params: query
  })
}

// 查询打本记录详细
export function getRecord(playId) {
  return request({
    url: '/record/record/' + playId,
    method: 'get'
  })
}

// 新增打本记录
export function addRecord(data) {
  return request({
    url: '/record/record',
    method: 'post',
    data: data
  })
}

// 修改打本记录
export function updateRecord(data) {
  return request({
    url: '/record/record',
    method: 'put',
    data: data
  })
}

// 删除打本记录
export function delRecord(playId) {
  return request({
    url: '/record/record/' + playId,
    method: 'delete'
  })
}

// 首页流水统计
export function countNum(query) {
  return request({
    url: '/record/record/countNum',
    method: 'get',
    params: query
  })
}

// 首页游戏类型统计
export function countPlayType(query) {
  return request({
    url: '/record/record/countPlayType',
    method: 'get',
    params: query
  })
}

// 首页排行统计
export function getRanking(query) {
  return request({
    url: '/record/record/getRanking',
    method: 'get',
    params: query
  })
}

